package com.dingwen.rabcon.service.impl;

import com.dingwen.rabcon.constant.RabbitConstant;
import com.dingwen.rabcon.service.EmailService;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

import java.util.Date;


/**
 * email service impl
 *
 * @author dingwen
 * 2021.06.17 11:22
 */
@Service
@RabbitListener(queues = {RabbitConstant.FANOUT_QUEUE_EMAIL_NAME})
public class EmailServiceImpl implements EmailService {

    @Override
    @RabbitHandler
    public void sendEmail(String message) {
        System.out.println("E: message = " + message);
    }
}
